/*
 * @Author: lyx 2858535420@qq.com
 * @Date: 2023-02-24 14:47:46
 * @LastEditors: lyx 2858535420@qq.com
 * @LastEditTime: 2023-02-28 10:30:54
 * @FilePath: /antd-vue2-template/src/mixins/i18n-mixin.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { mapState } from 'vuex';

const i18nMixin = {
  computed: {
    ...mapState({
      currentLang: state => state.app.lang
    })
  },
  methods: {
    setLang(lang) {
      this.$store.dispatch('app/setLang', lang);
    }
  }
};

export default i18nMixin;
